'''
添加产品页面
 '''
from selenium.webdriver.common.by import By
from page.base_page import BasePage

class TianjiaChanoing(BasePage):
    url = 'http://192.168.1.25/crm/index.php?m=product&a=add'

    # 产品名称
    cpmc_locator = (By.CSS_SELECTOR, '#name')
    # 开发团队
    kftd_locator = (By.CSS_SELECTOR, '#development_team')
    # 点击保存
    baocun_locator = (By.CSS_SELECTOR, '#form1 > table > tfoot > tr > td > input:nth-child(1)')

    def chanpingcingcheng(self,cpmc):
        self.driver.find_element(*self.cpmc_locator).send_keys(cpmc)
    def kaifatuandui(self,kftd):
        self.driver.find_element(*self.kftd_locator).send_keys(kftd)
    def dianjibaocun(self):
        self.driver.find_element(*self.baocun_locator).click()